<?php
	function my_crypt($str) {
		$couples=explode("&", $str);
		$couples[]="uniqID=".rand();
		shuffle($couples);
		$str=implode("&", $couples);
		
		$a=array_reverse(str_split(base64_encode(str_pad($str, ceil(strlen($str)/3)*3, " ", STR_PAD_RIGHT))));
		
		return implode("", $a);
	}
	
	function my_decrypt($str) {
		$a=array_reverse(str_split($str));
		
		$str=rtrim(base64_decode(implode("", $a)));
		$couples=explode("&", $str);
		unset($couples["uniqID"]);
		return implode("&", $couples);
	}
?>